<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SPHinXsys: SPH::Exception Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SPHinXsys
   &#160;<span id="projectnumber">alpha version</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_s_p_h.html">SPH</a></li><li class="navelem"><a class="el" href="class_s_p_h_1_1_exception.html">Exception</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_s_p_h_1_1_exception-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SPH::Exception Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A class for basic exception functionality.  
 <a href="class_s_p_h_1_1_exception.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="exception_8h_source.html">exception.h</a>&gt;</code></p>

<p>Inherits exception.</p>

<p>Inherited by <a class="el" href="class_s_p_h_1_1_index_out_of_range.html">SPH::IndexOutOfRange</a>, <a class="el" href="class_s_p_h_1_1_invalid_argument.html">SPH::InvalidArgument</a>, <a class="el" href="class_s_p_h_1_1_invalid_call.html">SPH::InvalidCall</a>, <a class="el" href="class_s_p_h_1_1_invalid_template_argument.html">SPH::InvalidTemplateArgument</a>, and <a class="el" href="class_s_p_h_1_1_key_not_found.html">SPH::KeyNotFound</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa12a01242576cff4f67d5b590530ce37"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_exception.html#aa12a01242576cff4f67d5b590530ce37">Exception</a> (const std::string &amp;aMsg=&quot;&quot;, const std::string &amp;aFile=&quot;&quot;, <a class="el" href="classint.html">int</a> aLine=-1)</td></tr>
<tr class="memdesc:aa12a01242576cff4f67d5b590530ce37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default Constructor.  <a href="#aa12a01242576cff4f67d5b590530ce37">More...</a><br /></td></tr>
<tr class="separator:aa12a01242576cff4f67d5b590530ce37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53751cfcd863dee7d50f6313cf5c93d7"><td class="memItemLeft" align="right" valign="top"><a id="a53751cfcd863dee7d50f6313cf5c93d7"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_exception.html#a53751cfcd863dee7d50f6313cf5c93d7">Exception</a> (const std::string &amp;file, <a class="el" href="classsize__t.html">size_t</a> line, const std::string &amp;func)</td></tr>
<tr class="memdesc:a53751cfcd863dee7d50f6313cf5c93d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Call this constructor from derived classes to add file, line and function information to the error message. Use this when throwing Derived classes. Use OPENSIM_THROW_&lt;&gt; macros at throw sites. <br />
 <br /></td></tr>
<tr class="separator:a53751cfcd863dee7d50f6313cf5c93d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f89fe983501ecfa1d1c7bb1d1899511"><td class="memItemLeft" align="right" valign="top"><a id="a6f89fe983501ecfa1d1c7bb1d1899511"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_exception.html#a6f89fe983501ecfa1d1c7bb1d1899511">Exception</a> (const std::string &amp;file, <a class="el" href="classsize__t.html">size_t</a> line, const std::string &amp;func, const std::string &amp;msg)</td></tr>
<tr class="memdesc:a6f89fe983501ecfa1d1c7bb1d1899511"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use this when you want to throw an <a class="el" href="class_s_p_h_1_1_exception.html" title="A class for basic exception functionality. ">Exception</a> and also provide a message. <br /></td></tr>
<tr class="separator:a6f89fe983501ecfa1d1c7bb1d1899511"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ad4cac41a192a62a1bbff5d7a94f74b"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_exception.html#a2ad4cac41a192a62a1bbff5d7a94f74b">~Exception</a> ()  throw ()</td></tr>
<tr class="separator:a2ad4cac41a192a62a1bbff5d7a94f74b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2913e53fac76d85ea7b0c90b01b28707"><td class="memItemLeft" align="right" valign="top"><a id="a2913e53fac76d85ea7b0c90b01b28707"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setMessage</b> (const std::string &amp;aMsg)</td></tr>
<tr class="separator:a2913e53fac76d85ea7b0c90b01b28707"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f014e5bfdefd79cadb362926575a074"><td class="memItemLeft" align="right" valign="top"><a id="a5f014e5bfdefd79cadb362926575a074"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>getMessage</b> () const</td></tr>
<tr class="separator:a5f014e5bfdefd79cadb362926575a074"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a503df4731370ffed90ef96cfef640f0e"><td class="memItemLeft" align="right" valign="top"><a id="a503df4731370ffed90ef96cfef640f0e"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>print</b> (std::ostream &amp;aOut) const</td></tr>
<tr class="separator:a503df4731370ffed90ef96cfef640f0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd31bbcaa4a31a529fda3a6daa26d4bc"><td class="memItemLeft" align="right" valign="top"><a id="abd31bbcaa4a31a529fda3a6daa26d4bc"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>what</b> () const noexcept override</td></tr>
<tr class="separator:abd31bbcaa4a31a529fda3a6daa26d4bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a6bf4e90724e5eb923218afb62c0c7b32"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_exception.html#a6bf4e90724e5eb923218afb62c0c7b32">addMessage</a> (const std::string &amp;msg)</td></tr>
<tr class="separator:a6bf4e90724e5eb923218afb62c0c7b32"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class for basic exception functionality. </p>
<p><a class="el" href="class_s_p_h_1_1_exception.html" title="A class for basic exception functionality. ">Exception</a> class manages the concatenation of error messages from all the derived classes. When creating new exceptions, remember to call <a class="el" href="class_s_p_h_1_1_exception.html#a6bf4e90724e5eb923218afb62c0c7b32">addMessage()</a> as shown above if the exception class does have any error message. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aa12a01242576cff4f67d5b590530ce37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa12a01242576cff4f67d5b590530ce37">&#9670;&nbsp;</a></span>Exception()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SPH::Exception::Exception </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>aMsg</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>aFile</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classint.html">int</a>&#160;</td>
          <td class="paramname"><em>aLine</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default Constructor. </p>
<p>This constructor is for backward compatibility. Use the constructor taking file, line, func. </p>

</div>
</div>
<a id="a2ad4cac41a192a62a1bbff5d7a94f74b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ad4cac41a192a62a1bbff5d7a94f74b">&#9670;&nbsp;</a></span>~Exception()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual SPH::Exception::~Exception </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
        <tr>
          <td align="right">throw </td><td>(</td><td colspan="2"></td>
        </tr>
        <tr>
          <td align="right"></td><td>)</td><td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>@ brief Destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6bf4e90724e5eb923218afb62c0c7b32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bf4e90724e5eb923218afb62c0c7b32">&#9670;&nbsp;</a></span>addMessage()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SPH::Exception::addMessage </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Add to the error message that will be returned for the exception. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>SPHINXsys/src/shared/simbody/<a class="el" href="exception_8h_source.html">exception.h</a></li>
<li>SPHINXsys/src/shared/simbody/<a class="el" href="exception_8cpp.html">exception.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
